
#include "../MQ2Plugin.h"

PLUGIN_VERSION(0.1);

PreSetup("MQ2BazaarExtract");

void TestME(PSPAWNINFO pChar, PCHAR szLine);

ITEMINFO *pg_Item;                                // dependent on MQ2ItemDisplay

// Called once, when the plugin is to initialize
PLUGIN_API VOID InitializePlugin(VOID)
{
    DebugSpewAlways("Initializing MQ2BazaarExtract");

    LoadMQ2Plugin("MQ2ItemDisplay");
    HMODULE h = LoadLibrary("MQ2ItemDisplay.dll");
    if (!h) {
        pg_Item = NULL;
    }
    else {
        pg_Item = (ITEMINFO *)GetProcAddress(h, "g_Item");
    }
    FreeLibrary(h);

    // Add commands, macro parameters, hooks, etc.
    AddCommand("/testme",TestME);

}


// Called once, when the plugin is to shutdown
PLUGIN_API VOID ShutdownPlugin(VOID)
{
    DebugSpewAlways("Shutting down MQ2BazaarExtract");

    RemoveCommand("/testme");
}

void TestME(PSPAWNINFO pChar, PCHAR szLine)
{
	WriteChatColor("It is a test omg! and up try 5",USERCOLOR_WHO);
}